import axios from "@/libs/api.request";

export const cancelAlarm = data => {
  return axios.request({
    data: data,
    url: "/bss/realtime/cancel_alarm",
    method: "post",
    headerType: "json"
  });
};

export const realtimeCount = () => {
  return axios.request({
    url: "/bss/realtime/count",
    method: "get"
  });
};

//大屏监控
export const getRealTimeBarList = data => {
  return axios.request({
    params: data,
    url: "/bss/realtime/all",
    method: "get"
  });
};

export const getRealTimeList = data => {
  return axios.request({
    params: data,
    url: "/bss/realtime/list",
    method: "get"
  });
};

export const getHisList = data => {
  return axios.request({
    params: data,
    url: "/bss/his/list",
    method: "get"
  });
};

export const exportHisList = data => {
  return axios.request({
    params: data,
    url: "/bss/his/export",
    method: "get"
  });
};

export const getAlarmList = data => {
  return axios.request({
    params: data,
    url: "/bss/his/alarm",
    method: "get"
  });
};

export const getRealTimeAlarmList = data => {
  return axios.request({
    params: data,
    url: "/bss/realtime/alarm",
    method: "get"
  });
};

// 参数设置
export const paramConfigInfo = data => {
  return axios.request({
    params: data,
    url: "/bss/setting/info",
    method: "get"
  });
};

export const updateParamConfig = data => {
  return axios.request({
    data: data,
    url: "/bss/setting/update",
    method: "post",
    headerType: "json"
  });
};

export const getNowDataSingle = data => {
  return axios.request({
    data: data,
    url: "/bss/realtime/now",
    method: "post",
    headerType: "json"
  });
};

